package com.zhan.ielts.dao.impl;

import org.springframework.stereotype.Repository;

import com.zhan.frame.core.dao.constants.SqlId;
import com.zhan.frame.core.dao.impl.BaseDaoImpl;
import com.zhan.frame.core.exception.DaoException;
import com.zhan.ielts.dao.PushMessageDao;
import com.zhan.ielts.domain.PushMessage;

@Repository
public class PushMessageDaoImpl extends BaseDaoImpl<PushMessage> implements PushMessageDao {

	@Override
	public int updateByFields(PushMessage entity) {
		try {
			return sqlSessionTemplate.update(getSqlName("updateByFields"), entity);

		} catch (Exception e) {
			throw new DaoException(String.format("根据ID更新对象某些属性出错！语句：%s", getSqlName(SqlId.SQL_UPDATE_BY_ID_SELECTIVE)),
					e);
		}
	}

}
